package com.example.demo.client.common;


public class CommonRequest {
    // 1. 发送给谁请求
    private String url;
    // 2. 发送请求的body
    private Object body;

    /**
     * 制造请求
     * @param url
     * @param body
     * @return
     */
    public static CommonRequest createRequest(String url, Object body) {
        CommonRequest request = new CommonRequest();
        request.setUrl(url);
        request.setBody(body);
        return request;
    }

    public static CommonRequest createRequest(String url) {
        CommonRequest request = new CommonRequest();
        request.setUrl(url);
        return request;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public Object getBody() {
        return body;
    }

    public void setBody(Object body) {
        this.body = body;
    }
}
